Skip to content

XDP sockets fallback #5995

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

XDP sockets fallback #5995

wants to merge 8 commits into from

Conversation

ripatel-fd
Copy link
Contributor

@ripatel-fd ripatel-fd commented Aug 10, 2025

Summary

  • Removes the loopback XDP device
  • Makes the socket tile mandatory
  • Makes the XDP tile forward TX jobs it can't serve (e.g. loopback) to the socket tile
  • Remove out-of-band neighbor solicit requests

Description

This patch improves connectivity for the XDP networking stack.

Introduces the notion of a fallback TX path for high-performance network tiles such as the XDP tile.
This will become more useful in the future for net tile alternatives like ibeth or DPDK.

In the initial version of the fallback TX path, the XDP tile copies out packet data to the socket tile.
In future versions, this can be done zero-copy for improved performance.

This allows the XDP tile to drop loopback support via another XDP socket (which seems to be rather error-prone).
Performance for the loopback path will worsen but this is acceptable since loopback traffic is lower than 300k pps in prod (loopback socket throughput without offloads).

Finally, since the socket tile is now mandatory, RX connectivity generally improves:
The socket tile will handle all edge cases for packet RX that the high-performance stack failed to handle --
For example packets coming in from Wireguard or IPsec tunnels, or other hardware interfaces.

This PR depends on #5993

@ripatel-fd ripatel-fd force-pushed the ripatel/passthru-loopback branch 3 times, most recently from 8f5ae8f to ba76b5e Compare August 10, 2025 04:56
riptl added 6 commits August 10, 2025 04:56
Fixes a design flaw where the xdp and sock tiles hardcode the
flow steering rules for the app tiles.

Defines a generic 'topo_net_rx' struct that maps UDP ports to
output links (and metadata like DST_PROTO IDs).

Adds a 'find_16x16' API for AVX-accelerated fast port matching.

Temporarily undoes the 'repair ping-pong' flow steering hack.
Forwards ping frames arriving at the 'repair ingress' port from
the shred tile to the repair tile.

This was previously done at the net tile level, but is moved to
the shred/repair tiles to keep the network stack clean.
Removes the loopback XDP socket from the net tile.  Also removes
the ethtool-loopback configure stage.  Loopback is done via a sock
tile in the future.
Thanks to the socket fallback, out-of-band neighbor solicitation
is no longer required.  When starting up (with an empty neighbor
table), Firedancer steers all packets through sockets.

This socket traffic will slowely populate the neighbor table with
entries, which then causes traffic to get steered over the high
performance path.
@ripatel-fd ripatel-fd force-pushed the ripatel/passthru-loopback branch 2 times, most recently from 1e2a8a3 to 0c571d1 Compare August 10, 2025 22:52
- Build entire packet in during_frag callback (fixes the need to
  save and restore state when transitioning from during_frag to
  after_frag)

- Publish non-routable packets to 'fallback' link instead of
  dropping them
@ripatel-fd ripatel-fd force-pushed the ripatel/passthru-loopback branch from 0c571d1 to b214c41 Compare August 10, 2025 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants